package com.spzx.product.domain;


import java.util.List;

import com.baomidou.mybatisplus.annotation.TableField;
import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;



/**
    * 商品
    */
@Data
public class Product extends BaseEntity {

    /**
     * 商品名称
     */
    @NotEmpty
    private String name;

    /**
     * 品牌ID
     */
    @NotNull
    private Long brandId;

    /**
     * 一级分类id
     */
    @NotNull
    private Long category1Id;

    /**
     * 二级分类id
     */
    @NotNull
    private Long category2Id;

    /**
     * 三级分类id
     */
    @NotNull
    private Long category3Id;

    /**
     * 计量单位
     */
    @NotEmpty
    private String unitName;

    /**
     * 轮播图
     */
    @NotEmpty
    private String sliderUrls;

    /**
     * 商品规格json
     */
    @NotEmpty
    private String specValue;

    /**
     * 线上状态：0-初始值，1-上架，-1-自主下架
     */
    private Byte status = 0 ;

    /**
     * 审核状态：0-初始值，1-通过，-1-未通过
     */
    private Byte auditStatus = 0;

    /**
     * 审核信息
     */
    private String auditMessage;

    @TableField(exist = false)
    @Schema(description = "品牌名称")
    private String brandName;

    @TableField(exist = false)
    @Schema(description = "1级分类标题")
    private String category1Name;

    @TableField(exist = false)
    @Schema(description = "2级分类标题")
    private String category2Name;

    @TableField(exist = false)
    @Schema(description = "3级分类标题")
    private String category3Name;

    @TableField(exist = false)
    @Schema(description = "spu详情图列表")
    private List<String> detailsImageUrlList;

    @TableField(exist = false)
    @Schema(description = "sku集合")
    @NotEmpty
    private List<ProductSku> productSkuList;
}